# Ceon URI Mapping

probably the best Zen Cart URI Mapping/SEO Module in the world! ...ever!

Click here to get more great software from Ceon

- Overview |
- Installation |
- Configuration |
- FAQs |
- Support |
- Revision History |
- Upgrading |
- Module Info |
- Module Features

## Installation

Installation of the module has been made as simple as possible and shouldn't take long for any stores which have not already modified any of the core files which this module has to modify.

If any of the core files this distribution uses have already been modified (because of another third party module being installed for example) then the changes for the respective files should be applied manually by copying across the appropriate sections of code required for the Ceon URI Mapping module. These sections are clearly marked (with “// BEGIN” and “// END” comments) within the sample files provided in this distribution.

### Requirements

- A webserver that supports rewrite rules is required. Currently tested/supported webservers are:

  - Apache with mod_rewrite
  - IIS with ISAPI_Rewrite 3
  - IIS with IIS URL Rewrite
  - nginx
  - Zeus Webserver (get in contact for integration details)

### Installation Overview

1. Copy the new files from the distribution into the Zen Cart installation.
2. Copy the modified core files from the distribution into the Zen Cart installation, or modify the respective core files.
3. Copy the modified template files from the distribution into the Zen Cart installation or modify their equivalents in the store's existing template files.
4. [Zen Cart Versions 1.3.0 - 1.3.8 Only] Enable Canonical URI Support.
5. Create the Database Tables and Configuration and Configure the URI Auto-generation Settings.
6. Configure the settings for the Auto-managing of URIs for Products' “Reviews” and “Tell-A-Friend” pages
7. Run the Installation Check
8. Add the rewrite rules to the webserver (Apache/IIS etc.).
9. [OPTIONAL but RECOMMENDED] Configure the Google Sitemap (XML) Module
10. [OPTIONAL but RECOMMENDED] Take a note of the FAQs
11. Set up the URI mappings for categories, products, manufacturers and EZ-Pages.

### Installation Steps

1. #### New Files

   These are the new files which make up this module. Copy them all into their respective folders in the Zen Cart installation.

   Most files are used by all Zen Cart versions.

   There is an additional file which is used only by Zen Cart 1.3.x; if the store uses Zen Cart 1.3.x, be sure to copy this extra file across from the folder files/additional_file_for_1.3.x.

   ##### New files for the Admin directory

   Most Zen Cart stores have their admin directory renamed from the default of “admin”.

   Copy all of the folders and files from the files/admin folder into the store's “admin” directory, whatever it is called.

   The files are already in the correct directory structure, so a single drag-and-drop of the folders/files in the files/admin folder into the “admin” directory for the store will put the files in the correct locations.

   Please do not copy the files individually - there's simply no need - doing so often results in files being missed out!

   - admin/images/ceon-button-logo.png
   - admin/images/ceon-input-fade-tb-gray-white.png
   - admin/images/ceon-tab-background.png
   - admin/images/ceon-tab-background-selected.png
   - admin/includes/classes/class.CeonURIMappingAdminCategoryPages.php
   - admin/includes/classes/class.CeonURIMappingAdminEZPagePages.php
   - admin/includes/classes/class.CeonURIMappingAdminManufacturerPages.php
   - admin/includes/classes/class.CeonURIMappingAdminProductPages.php
   - admin/includes/classes/class.CeonURIMappingConfigUtility.php
   - admin/includes/classes/class.CeonURIMappingInstallationCheck.php
   - admin/includes/classes/class.CeonURIMappingInstallOrUpgrade.php
   - admin/includes/classes/class.CeonURIMappingTabbedPanelAdminInterface.php
   - admin/includes/classes/class.CeonURIMappingVersion.php
   - admin/includes/extra_datafiles/ceon_uri_mapping_database_tables.php
   - admin/includes/extra_datafiles/ceon_uri_mapping_filenames.php
   - admin/includes/extra_datafiles/ceon_uri_mapping_product_pages.php
   - admin/includes/functions/extra_functions/ceon_uri_mapping_admin_page_reg.php
   - admin/includes/languages/english/extra_definitions/ceon_uri_mapping.php
   - admin/includes/languages/english/ceon_uri_mapping_admin_pages.php
   - admin/includes/languages/english/ceon_uri_mapping_category_pages.php
   - admin/includes/languages/english/ceon_uri_mapping_config.php
   - admin/includes/languages/english/ceon_uri_mapping_default_uri_parts.php
   - admin/includes/languages/english/ceon_uri_mapping_ezpage_pages.php
   - admin/includes/languages/english/ceon_uri_mapping_installation_check.php
   - admin/includes/languages/english/ceon_uri_mapping_manufacturer_pages.php
   - admin/includes/languages/english/ceon_uri_mapping_product_pages.php
   - admin/includes/languages/english/ceon_uri_mapping_tabbed_panel_admin_interface.php
   - admin/ceon_uri_mapping_config.php
   - admin/ceon_uri_mapping_installation_check.php

   ###### Additional File for Zen Cart 1.3.x

   Copy the file from the files/additional_file_for_1.3.x/admin folder into the store's “admin” directory, whatever it is called.

   - admin/includes/boxes/extra_boxes/ceon_uri_mapping_modules_dhtml.php

   ##### New files for the main store directory

   Copy the includes folder from the files folder into the store's main directory.

   The files are already in the correct directory structure, so a single drag-and-drop of the folder into the root directory for the store will put the files in the correct locations.

   Please do not copy the files individually - there's simply no need - doing so often results in files being missed out!

   Warning: Be careful NOT to copy the files from the files/includes folder into the store's admin/includes directory, they go in the includes directory which is alongside, not inside the store's admin directory.

   - includes/auto_loaders/config.ceon_uri_mapping.php
   - includes/classes/transliteration (* This directory and ALL files in it!)
   - includes/classes/class.CeonURIMappingAdmin.php
   - includes/classes/class.CeonURIMappingAdminCategories.php
   - includes/classes/class.CeonURIMappingAdminCategoriesProducts.php
   - includes/classes/class.CeonURIMappingAdminEZPages.php
   - includes/classes/class.CeonURIMappingAdminManufacturers.php
   - includes/classes/class.CeonURIMappingAdminProducts.php
   - includes/classes/class.CeonURIMappingDBLookup.php
   - includes/classes/class.CeonURIMappingHandler.php
   - includes/classes/class.CeonURIMappingHandlerBase.php
   - includes/classes/class.CeonURIMappingHREFLinkBuilder.php
   - includes/classes/class.String.php
   - includes/classes/class.Transliteration.php
   - includes/extra_datafiles/ceon_uri_mapping_database_tables.php
   - includes/extra_datafiles/ceon_uri_mapping_filenames.php
   - includes/extra_datafiles/ceon_uri_mapping_product_pages.php

2. #### Modified Core Files

   A few core Zen Cart files must be modified to work with the Ceon URI Mapping module.

   ##### Modified core files for the Admin directory

   - It is likely that none of these files have been modified for the store already, in which case it should be possible to simply back up the files and then overwrite the files with the pre-modified sample files from this distribution, for the version of Zen Cart being used by the store.

   - However, if any of these core files have already been modified for the store, the changes within the sample files included in this distribution must be applied to the previously modified core files.

     The changes are clearly marked within the sample files in the distribution and should be easy enough to copy across, especially if a “diff” software package (such as the free WinMerge or the excellent, commercial, Beyond Compare) is used.

     Instructions on how to copy across the modifications necessary for this module - to version of the respective core files which have previously been modified - can be found in this FAQ.

   The modified core files can be found within the modified_core_files folder in the distribution. A list of the files follows.

   If any of the “Product Types” (e.g. Document General or Product Book) aren't used by the store, there's no need to copy/modify the files in the respective directories (e.g. document_general or product_book).

   If the store's core files haven't been modified then there's no need to copy the files individually - that often results in files being missed out! They already have the correct folder structure, so a single drag-and-drop of the folders/files in the modified_core_files folder (for the exact same version of Zen Cart) into the root directory for the store will put the files in the correct locations.

   Please Note: If the admin folder for the store is not named “admin”, then care must be taken to place the files from within the modified_core_files/admin folder into the store's admin folder. Simply copying across the modified_core_files/admin folder won't work!

   - admin/includes/functions/general.php
   - admin/includes/functions/html_output.php
   - admin/includes/modules/document_general/collect_info.php
   - admin/includes/modules/document_general/preview_info.php
   - admin/includes/modules/document_product/collect_info.php
   - admin/includes/modules/document_product/preview_info.php
   - admin/includes/modules/product/collect_info.php
   - admin/includes/modules/product/preview_info.php
   - admin/includes/modules/product_book/collect_info.php
   - admin/includes/modules/product_book/copy_to_confirm.php
   - admin/includes/modules/product_book/preview_info.php
   - admin/includes/modules/product_book/update_product.php
   - admin/includes/modules/product_free_shipping/collect_info.php
   - admin/includes/modules/product_free_shipping/preview_info.php
   - admin/includes/modules/product_music/collect_info.php
   - admin/includes/modules/product_music/copy_to_confirm.php
   - admin/includes/modules/product_music/preview_info.php
   - admin/includes/modules/product_music/update_product.php
   - admin/includes/modules/copy_to_confirm.php
   - admin/includes/modules/move_product_confirm.php
   - admin/includes/modules/sidebox_move_product.php
   - admin/includes/modules/update_product.php
   - admin/categories.php
   - admin/document_general.php
   - admin/document_product.php
   - admin/ezpages.php
   - admin/manufacturers.php
   - admin/product.php
   - admin/product_free_shipping.php
   - admin/product_music.php

   ##### Modified core files for the main store directory

   Some versions of Zen Cart require modifications that others don't. Just apply the modifications to files that are present in the modified_core_files folder for the version of Zen Cart the store uses.

   If a file doesn't exist in the overrides directory, simply copy the pre-modified sample file from this distribution, for the version of Zen Cart being used by the store, into the overrides folder.

   - includes/auto_loaders/config.canonical.php (Zen Cart 1.3.0 - 1.3.8)
   - includes/functions/html_output.php (Zen Cart 1.3.0 - 1.5.0)
   - includes/init_includes/overrides/init_add_crumbs.php (Zen Cart 1.3.5 - 1.5.0)
   - includes/init_includes/overrides/init_canonical.php (Zen Cart 1.3.0 - 1.5.0)
   - includes/init_includes/overrides/init_currencies.php (Zen Cart 1.3.0 - 1.5.0)
   - includes/init_includes/overrides/init_sessions.php (Zen Cart 1.3.9/1.5.0)

3. #### Template Files For Zen Cart 1.3.x

   A few of the standard Zen Cart template files require modifications to work with this module as they weren't built in a way that supports static URIs.

   Modifications to existing template files, for static URIs to be able to be used by some of the standard Zen Cart sideboxes and by the product listing filter forms, have been made to “clean” copies of the template files from a “fresh” installation of Zen Cart and are included as “sample” files in this distribution.

   - If any of these template files haven't already been modified for the store, the sample files included in this distribution can be copied into the store's template directory and will then override the standard versions of the files included in the Zen Cart distribution.

   - If any of these template files have already been modified for the store, then the changes necessary to support the use of static URIs must be made to the store's modified file(s). The changes are clearly marked within the sample files in the distribution and should be easy enough to copy across, especially if a “diff” software package (such as the free WinMerge or the excellent, commercial, Beyond Compare) is used.

     Instructions on how to copy across the modifications necessary for this module - to template files which have previously been modified - can be found in this FAQ.

   The sample template files can be found within the template_override_files folder in the distribution. They are:

   - includes/templates/STORE-TEMPLATE/sideboxes/tpl_manufacturers_select.php
   - includes/templates/STORE-TEMPLATE/sideboxes/tpl_music_genres_select.php
   - includes/templates/STORE-TEMPLATE/sideboxes/tpl_record_company_select.php
   - includes/templates/STORE-TEMPLATE/templates/tpl_index_product_list.php

4. #### [Zen Cart Versions 1.3.0 - 1.3.8 Only] Enable Canonical URI Support

   This installation step doesn't apply for stores using Zen Cart versions 1.3.9 or 1.5.0.

   Canonical URI support is an absolutely essential feature of this module, so it must be enabled properly.

   If it isn't, search engines will penalise the site and it may well drop down in its rankings!

   Zen Cart versions 1.3.9 and 1.5.0 have the necessary canonical code built into them already but previous versions of Zen Cart must have a file modified to add this support.

   The file includes/templates/STORE-TEMPLATE/common/html_header.php must be modified.

   - If the template file includes/templates/STORE-TEMPLATE/common/html_header.php does not yet exist, then simply copy across the file from the template_override_files folder for the version of Zen Cart the store is using.

   - If the template file includes/templates/STORE-TEMPLATE/common/html_header.php does exist for the store, then the simple change necessary for canonical URI support must be made to the store's html_header.php.

     The change is clearly marked within the sample file in the distribution and should be easy enough to copy across, especially if a “diff” software package (such as the free WinMerge or the excellent, commercial, Beyond Compare) is used.

     Instructions on how to copy across the modifications necessary for this module - to existing template files - can be found in this FAQ.

5. #### Create the Database Tables and Configuration and Configure the URI Auto-generation Settings

   This software comes with some intelligent installation and error checking functionality which makes it easy to install the module and to keep the database and configuration up to date.

   This installation/upgrade functionality runs automatically when the configuration utility is accessed. (In the future, if the module is being upgraded, the configuration utility should also be accessed then.)

   - Simply go to Modules > URI Mapping Config in the Admin and the database tables and configuration will be automatically created.

   Details of how to configure the URI auto-generation settings and set up the URI mappings for the store are provided in the configuration section.

6. #### Configure the settings for the Auto-managing of URIs for Products' “Reviews” and “Tell-A-Friend” pages

   It is highly recommended to configure these settings as, if the store doesn't use any of the “Reviews” pages or the “Tell-A-Friend” page (which has been removed altogther from Zen Cart 1.5.0 onwards), disabling the automatic generation of URIs for these page types reduces the number of URI Mappings added to the store's database, keeping the software fast and efficient, and therefore avoiding a potentially wasteful slowdown of the site!

   - Go to Modules > Ceon URI Mapping (SEO) Config in the Zen Cart Admin.

   - Go to the Auto-managed Product Page URIs tab.

   - Untick the checkboxes for any page types the store doesn't use - or simply isn't interested in having static URIs for - and click “Save”.

7. #### Run the Installation Check

   This software comes with an amazingly handy Installation Check utility.

   The installation check will examine the store's configuration files and warn you about any mistakes in the files which you need to correct, and will even provide full information about what you should do.

   It will also check all the core files that must be modified for Ceon URI Mapping to work optimally, and warn you if any of the modifications are missing or out of date, again giving information on what you should do!

   A quick glance at this new admin page should help you identify and fix any problems with the installation quickly and easily!

   - Go to Modules > Ceon URI Mapping (SEO) Config in the Zen Cart Admin.

   - Then go to the Installation Check tab and click on the link to open the Installation Check utility page.

   - The module will now automatically carry out the installation check.

   - If any errors are listed, follow the instructions given by the software.

8. #### Add the Rewrite Rule to the Webserver (Apache/IIS etc.)

   Having a working rewrite rule installed is one of the most important aspects of installing this software.

   To make things as easy as possible, the module comes with handy “Example Rewrite Rule” functionality.

   The module will analyse the filesystem on the server and attempt to build a rewrite rule for the store that has any necessary exclusions added.

   - Go to Modules > Ceon URI Mapping (SEO) Config in the Zen Cart Admin.

   - Then go to the Installation Check tab and click on the link to open the Installation Check utility page.

   - Since any errors with the store's configuration files should have been fixed after running the installation check in the previous step, the “Example Rewrite Rule” panel will be displayed.

   - Read the instructions given in that panel and copy and paste the new Rewrite Rule to the store's .htaccess file/VirtualHost directive, as desired.

   - Remember this is just an Example rewrite rule, some customisation may be required to take account of other software on the server which the site uses, or other file type extensions etc. that the store wants to exclude or include.

   - Details of how to modify the necessary rewrite rule for the store are provided in the configuration section.

9. #### [OPTIONAL but RECOMMENDED] Configure the SitemapXML (formerly “Google Sitemap”) Module

   If the store uses the SitemapXML (Google Sitemap) module, it needs to be configured to work better with static URIs.

   Otherwise, the store's rankings may be penalised because of links in the sitemap redirecting to other links.

   - Go to Configuration > Sitemap XML in the Zen Cart Admin.

   - Newer versions of the module have the option “Using parameter language in links”. If this option exists, make sure to set it to “false”.

   - Older versions of the module have the option “Generate language_id for default language”. If this option exists, make sure to set it to “false”.

10. #### [OPTIONAL but RECOMMENDED] Take a note of the FAQs

    Lots of people ask us the same questions. It's worth reading the FAQs.

    At the very least, here are some of the most popular questions that are covered.

    If you are experiencing any problems, please check the FAQs for more questions and their answers. Support information is outlined in the support section.

    - The software is installed and working but the store's URIs still use dynamic Zen Cart ones (like `index.php?main_page=xx`).
    - A 404 server error is being displayed (e.g. a 404 error).
    - A session parameter (like “`?zenid=XXXX`”) is being added to the end of the store's URIs.
    - A string beginning with “`?cPath`” is being added to the end of a product's URI.
    - When Ceon URI Mapping is enabled images stop appearing on the site!
    - When Ceon URI Mapping is enabled the site's layout is messed up!
    - When Ceon URI Mapping is enabled an AJAX module (e.g. JavaScript menus) doesn't work properly!

11. #### Set Up the URI Mappings for Categories, Products, Manufacturers and EZ-Pages

    Now all that has to be done is to set up the URI mappings for the store in the Zen Cart Admin.

    Details of how to configure the module and how to set up the URI mappings for the store are provided in the configuration section.

12. #### That's it! Enjoy the new URIs!

    It may have taken a wee while, but the above should all have been fairly easy to do. And the Installation Check certainly helps!

    Please make sure to keep up to date with the software. Thanks to the way the module has been designed, with lots of auto-upgrade functionality built in, upgrading to subsequent versions will most likely just be a matter of overwriting some files, taking only a few seconds.

    Enjoy the software and the nice, readable and easy-to-type URIs it allows the store to have!

Back to top